﻿using Microsoft.SmallBasic.Library;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace SmallBasicFun.Tests.Bugs
{
    [Ignore]
    [TestClass]
    public class GraphicsWindowTests
    {
        [TestMethod]
        public void ReadFontName()
        {
            for (int i = 0; i < 200; i++)
            {
                GraphicsWindow.FontName = "Arial Black";
                Primitive fontName = "Tahoma";
                GraphicsWindow.FontName = fontName;
                Assert.AreEqual(fontName, GraphicsWindow.FontName);
            }
        }
        [TestMethod]
        public void ReadFontSize()
        {
            for (int i = 0; i < 200; i++)
            {
                GraphicsWindow.FontSize = 20;
                Primitive fontSize = 10;
                GraphicsWindow.FontSize = fontSize;
                Assert.AreEqual(fontSize, GraphicsWindow.FontSize);
            }
        }
        [TestMethod]
        public void ReadFontBold()
        {
            for (int i = 0; i < 200; i++)
            {
                Primitive bold = i % 2 == 0;
                GraphicsWindow.FontBold = !bold;
                GraphicsWindow.FontBold = bold;
                Assert.AreEqual(bold, GraphicsWindow.FontBold);
            }
        }
        [TestMethod]
        public void ReadFontItalic()
        {
            for (int i = 0; i < 200; i++)
            {
                Primitive bold = i % 2 == 0;
                GraphicsWindow.FontItalic = !bold;
                GraphicsWindow.FontItalic = bold;
                Assert.AreEqual(bold, GraphicsWindow.FontItalic);
            }
        }
    }
}